/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

京东云iotcard接口
iotcard相关接口

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/


#ifndef IotcardClient_h
#define IotcardClient_h


#import <JDCloudOCSDKCore/JDCloudOCSDKCore.h>
#import <JDCloudOCSDKIotcard/IotcardApiModel.h>

@interface IotcardClient : NSObject<JDCloudClient>{
    @private
    NSString* _userAgent;
    NSString* _serviceName;
    NSString* _version;
    }

    @property (strong,readonly,nonatomic) NSString* userAgent;

    @property (strong,readonly,nonatomic) NSString* serviceName;

    @property (strong,readonly,nonatomic) NSString* version;

    @property (strong,nonatomic) NSString* contentType;

    @property (strong,nonatomic) Credential* credential;

    @property (strong,nonatomic) SDKEnvironment* sdkEnvironment;

    @property (strong,nonatomic) NSMutableDictionary* customHeader;

    @property  (strong,nonatomic) NSString* httpRequestProtocol;

    -(void) addCustomerHeaderWithKey:(NSString*) key
    value:(NSString*) value;

    -(id)initWithGlobalConfig;

    -(id)initWithCredential:(Credential*)credential
    sdkEnvironment:(SDKEnvironment*)sdkEnvironment;
    -(id)initWithCredential:(Credential*)credential;
    /**
    onOffStatus sync request
    @param onOffStatusRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `onOffStatusResponse` the request response data model
    */
    -(NSDictionary*) onOffStatusSyncWithRequest:(IotcardOnOffStatusRequest*) onOffStatusRequest;

    -(void)onOffStatusAsyncWithRequest:(IotcardOnOffStatusRequest*) onOffStatusRequest
    completionHandler:(void(^)(int statusCode,IotcardOnOffStatusResponse* _Nullable onOffStatusResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    closeIotFlow sync request
    @param closeIotFlowRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `closeIotFlowResponse` the request response data model
    */
    -(NSDictionary*) closeIotFlowSyncWithRequest:(IotcardCloseIotFlowRequest*) closeIotFlowRequest;

    -(void)closeIotFlowAsyncWithRequest:(IotcardCloseIotFlowRequest*) closeIotFlowRequest
    completionHandler:(void(^)(int statusCode,IotcardCloseIotFlowResponse* _Nullable closeIotFlowResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    openIotCard sync request
    @param openIotCardRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `openIotCardResponse` the request response data model
    */
    -(NSDictionary*) openIotCardSyncWithRequest:(IotcardOpenIotCardRequest*) openIotCardRequest;

    -(void)openIotCardAsyncWithRequest:(IotcardOpenIotCardRequest*) openIotCardRequest
    completionHandler:(void(^)(int statusCode,IotcardOpenIotCardResponse* _Nullable openIotCardResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    openIotFlow sync request
    @param openIotFlowRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `openIotFlowResponse` the request response data model
    */
    -(NSDictionary*) openIotFlowSyncWithRequest:(IotcardOpenIotFlowRequest*) openIotFlowRequest;

    -(void)openIotFlowAsyncWithRequest:(IotcardOpenIotFlowRequest*) openIotFlowRequest
    completionHandler:(void(^)(int statusCode,IotcardOpenIotFlowResponse* _Nullable openIotFlowResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    lifeStatus sync request
    @param lifeStatusRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `lifeStatusResponse` the request response data model
    */
    -(NSDictionary*) lifeStatusSyncWithRequest:(IotcardLifeStatusRequest*) lifeStatusRequest;

    -(void)lifeStatusAsyncWithRequest:(IotcardLifeStatusRequest*) lifeStatusRequest
    completionHandler:(void(^)(int statusCode,IotcardLifeStatusResponse* _Nullable lifeStatusResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    closeIotCard sync request
    @param closeIotCardRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `closeIotCardResponse` the request response data model
    */
    -(NSDictionary*) closeIotCardSyncWithRequest:(IotcardCloseIotCardRequest*) closeIotCardRequest;

    -(void)closeIotCardAsyncWithRequest:(IotcardCloseIotCardRequest*) closeIotCardRequest
    completionHandler:(void(^)(int statusCode,IotcardCloseIotCardResponse* _Nullable closeIotCardResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    gprsRealtimeInfo sync request
    @param gprsRealtimeInfoRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `gprsRealtimeInfoResponse` the request response data model
    */
    -(NSDictionary*) gprsRealtimeInfoSyncWithRequest:(IotcardGprsRealtimeInfoRequest*) gprsRealtimeInfoRequest;

    -(void)gprsRealtimeInfoAsyncWithRequest:(IotcardGprsRealtimeInfoRequest*) gprsRealtimeInfoRequest
    completionHandler:(void(^)(int statusCode,IotcardGprsRealtimeInfoResponse* _Nullable gprsRealtimeInfoResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;
    /**
    gprsStatus sync request
    @param gprsStatusRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
            `gprsStatusResponse` the request response data model
    */
    -(NSDictionary*) gprsStatusSyncWithRequest:(IotcardGprsStatusRequest*) gprsStatusRequest;

    -(void)gprsStatusAsyncWithRequest:(IotcardGprsStatusRequest*) gprsStatusRequest
    completionHandler:(void(^)(int statusCode,IotcardGprsStatusResponse* _Nullable gprsStatusResponse, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;

    /**
    iotcard common sync request
    @param  jdcloudDataRequest request param
    @return key `statusCode` http request status code type is int
            `dataResult` the http request response data  type is NSData
            `requestError` the request error type is NSError
    */
    -(NSDictionary*) iotcardCommonSyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                           url:(NSString*) url
                                        method:(NSString*) method;

    -(void)iotcardCommonAsyncWithRequest:(JDCloudDataRequest*) jdcloudDataRequest
                                  url:(NSString*) url
                               method:(NSString*) method
                    completionHandler:(void(^)(int statusCode, NSData* _Nullable responseData,NSError * _Nullable error))completionHandler;

    @end


    #endif /* IotcardClient_h */
